import { DEBUG } from "cc/env";
import {js,log,error} from "cc";
let backLog = console.log || log;
let backError = console.error || error;
/**
 * Log打印定制信息
 * */
export default class Log {
    //修改fix,定制信息
    private static fix:string = "zzzzzed";
    public static debug(...params: any[]) {
        if (DEBUG) return backLog.apply(null, js.array.appendObjectsAt(Array.prototype.slice.call(params), [this.fix,"[debug]#"], 0))
    }
    public static info(...params: any[]) {
        if (DEBUG) return backLog.apply(null, js.array.appendObjectsAt(Array.prototype.slice.call(params), [this.fix,"[info]#"], 0))
    }
    public static error(...params: any[]) {
        if (DEBUG) return backError.apply(null, js.array.appendObjectsAt(Array.prototype.slice.call(params), ["[error]#"], 0))
    }
    public static socket(...params: any[]) {
        if (DEBUG) return backLog.apply(null, js.array.appendObjectsAt(Array.prototype.slice.call(params), ["[socket]#"], 0))
    }

}